<?php
$this->breadcrumbs=array(
    'Quản trị'=>array('/admin'),
    'Cơ sở'=>array('index'),
    'Danh sách',
);

$this->menu=array(
    array('label'=>'Danh sách', 'url'=>array('index')),
    array('label'=>'Thêm mới', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('facility-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Cơ sở đào tạo</h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'facility-grid',
    'dataProvider'=>$model->search(),
    //'filter'=>$model,
    'columns'=>array(
        //'id',
        'title',
        'description:html',
        'address',
        array(
            'name'=>'teacher_id',
            'value'=> '$data->teacher->name'
        ),
        //'create_time',
        //'update_time',
        /*
          'teacher_id',
          'status',
          */
        array(
            'class'=>'CButtonColumn',
        ),
    ),
)); ?>
